<template>
  <teleport to="#message">
    <div
      v-if="isVisible"
      class="alert alert-success small fixed-top w-50 mx-auto  mt-4"
      role="alert"
    >
      A simple success alert with like.
    </div>
  </teleport>
</template>

<script>
import { ref } from 'vue';
export default {
  name: 'Message',
  setup() {
    const isVisible = ref(true);
    setTimeout(() => {
      isVisible.value = false;
    }, 2000);
    return { isVisible };
  },
};
</script>

<style lang="scss" scoped></style>
